#ifndef SCRIPT_COMPONENT
#define SCRIPT_COMPONENT

#include "Base/Component.h"
extern "C"
{
    #include "lua.h"
}

#include <luabind/luabind.hpp>

class ScriptComponent : public BPL::Component
{
public:
	static const int familyId = 7;

	ScriptComponent():fromFile(false),scriptStr(""){}
	virtual ~ScriptComponent()
	{
		lua_close(script);
		script = NULL;
	}

	std::string file;
	bool fromFile;
	std::string scriptStr;

	lua_State* script;
};

typedef boost::shared_ptr<ScriptComponent> ScriptComponentPtr;



#endif
